import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
//  let vm =null
//  const sendThis =(_this)=>{
//     vm=_this
    
//   }
// var inputdom = document.getElementById("input_text")
// var data =inputdom.value

const state = {
    counter:"请输入内容"
    }
const mutations={
        increment(state){
            state.counter="hhhhhh"
        }
    }
const actions={
    update(context){
        setTimeout(()=>{
            context.commit('increment')
        },2000)
    }
}
const store = new Vuex.Store({
    state,
    mutations,
    actions
})
export default store
    
    

    
